\documentclass[9pt]{article}
\usepackage{amsmath}
\begin{document}
Read in the following dictionary:
\[\begin{array}{c| c c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} }
 x_{8}   &  -19.0 & -3.00 x_{1} & -4.00 x_{2} & -6.00 x_{3} & +  2.00 x_{4} & +  9.00 x_{5} & +  8.00 x_{6} & -6.00 x_{7}\\
 x_{9}   &  -7.0 & -2.00 x_{1} & +  8.00 x_{2} & + 10.00 x_{3} & +  3.00 x_{4} & -5.00 x_{5} & + 10.00 x_{6} & + 10.00 x_{7}\\
 x_{10}   &  30.0 & -2.00 x_{1} & +  5.00 x_{2} & -9.00 x_{3} & -6.00 x_{4} & -6.00 x_{5} & + 10.00 x_{6} & -3.00 x_{7}\\
 x_{11}   &  26.0 & -8.00 x_{1} & -3.00 x_{2} & +  1.00 x_{3} & +  9.00 x_{4} & -1.00 x_{5} & -2.00 x_{6} & -10.00 x_{7}\\
 x_{12}   &  50.0 & +  1.00 x_{1} & +  2.00 x_{2} & +  7.00 x_{3} &   & -7.00 x_{5} & -4.00 x_{6} & -10.00 x_{7}\\
\hline
z    &  0.0  &   & +  3.00 x_{2} &   & -2.00 x_{4} & -3.00 x_{5} & -4.00 x_{6} & -4.00 x_{7}\\
\end{array}\]
\subsection{Initialization Phase: Dual Problem Solving}
New Objective in primal was changed to : \[ \max\ \sum_{j=1}^{7}\ - x_j \] 
Primal variable $x_j$ corresponds to dual variable $y_j$ for $j = 1,\ldots,12$
Dual Dictionary (with objective changed is): 
\[\begin{array}{c| c c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} }
 y_{1}   &  1.0 & +  3.00 y_{8} & +  2.00 y_{9} & +  2.00 y_{10} & +  8.00 y_{11} & -1.00 y_{12}\\
 y_{2}   &  1.0 & +  4.00 y_{8} & -8.00 y_{9} & -5.00 y_{10} & +  3.00 y_{11} & -2.00 y_{12}\\
 y_{3}   &  1.0 & +  6.00 y_{8} & -10.00 y_{9} & +  9.00 y_{10} & -1.00 y_{11} & -7.00 y_{12}\\
 y_{4}   &  1.0 & -2.00 y_{8} & -3.00 y_{9} & +  6.00 y_{10} & -9.00 y_{11} &   \\
 y_{5}   &  1.0 & -9.00 y_{8} & +  5.00 y_{9} & +  6.00 y_{10} & +  1.00 y_{11} & +  7.00 y_{12}\\
 y_{6}   &  1.0 & -8.00 y_{8} & -10.00 y_{9} & -10.00 y_{10} & +  2.00 y_{11} & +  4.00 y_{12}\\
 y_{7}   &  1.0 & +  6.00 y_{8} & -10.00 y_{9} & +  3.00 y_{10} & + 10.00 y_{11} & + 10.00 y_{12}\\
\hline
z    &  -0 & + 19.00 y_{8} & +  7.00 y_{9} & -30.00 y_{10} & -26.00 y_{11} & -50.00 y_{12}\\
\end{array}\]
Initialization succeeded in finding final dual dictionary with 3 pivots
\[\begin{array}{c| c c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} }
 y_{1}   &  1.36153846154 & -0.11 y_{5} & -0.25 y_{6} & +  0.11 y_{10} & +  8.62 y_{11} & +  0.77 y_{12}\\
 y_{2}   &  1.4 & -0.80 y_{5} & +  0.40 y_{6} & +  3.80 y_{10} & +  3.00 y_{11} & +  2.00 y_{12}\\
 y_{3}   &  1.61538461538 & -1.08 y_{5} & +  0.46 y_{6} & + 20.08 y_{10} & -0.85 y_{11} & -1.31 y_{12}\\
 y_{4}   &  0.746153846154 & -0.03 y_{5} & +  0.28 y_{6} & +  9.03 y_{10} & -9.54 y_{11} & -0.92 y_{12}\\
 y_{8}   &  0.115384615385 & -0.08 y_{5} & -0.04 y_{6} & +  0.08 y_{10} & +  0.15 y_{11} & +  0.69 y_{12}\\
 y_{9}   &  0.00769230769231 & +  0.06 y_{5} & -0.07 y_{6} & -1.06 y_{10} & +  0.08 y_{11} & -0.15 y_{12}\\
 y_{7}   &  1.61538461538 & -1.08 y_{5} & +  0.46 y_{6} & + 14.08 y_{10} & + 10.15 y_{11} & + 15.69 y_{12}\\
\hline
z    &  2.24615384615 & -1.03 y_{5} & -1.22 y_{6} & -35.97 y_{10} & -22.54 y_{11} & -37.92 y_{12}\\
\end{array}\]
Primal Dictionary is:
\[\begin{array}{c| c c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} }
 x_{5}   &  1.03076923077 & +  0.11 x_{1} & +  0.80 x_{2} & +  1.08 x_{3} & +  0.03 x_{4} & +  0.08 x_{8} & -0.06 x_{9} & +  1.08 x_{7}\\
 x_{6}   &  1.21538461538 & +  0.25 x_{1} & -0.40 x_{2} & -0.46 x_{3} & -0.28 x_{4} & +  0.04 x_{8} & +  0.07 x_{9} & -0.46 x_{7}\\
 x_{10}   &  35.9692307692 & -0.11 x_{1} & -3.80 x_{2} & -20.08 x_{3} & -9.03 x_{4} & -0.08 x_{8} & +  1.06 x_{9} & -14.08 x_{7}\\
 x_{11}   &  22.5384615385 & -8.62 x_{1} & -3.00 x_{2} & +  0.85 x_{3} & +  9.54 x_{4} & -0.15 x_{8} & -0.08 x_{9} & -10.15 x_{7}\\
 x_{12}   &  37.9230769231 & -0.77 x_{1} & -2.00 x_{2} & +  1.31 x_{3} & +  0.92 x_{4} & -0.69 x_{8} & +  0.15 x_{9} & -15.69 x_{7}\\
\hline
z    &  -2.24615384615 & -1.36 x_{1} & -1.40 x_{2} & -1.62 x_{3} & -0.75 x_{4} & -0.12 x_{8} & -0.01 x_{9} & -1.62 x_{7}\\
\end{array}\]
Primal Dictionary with original objective is:
\[\begin{array}{c| c c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} }
 x_{5}   &  1.03076923077 & +  0.11 x_{1} & +  0.80 x_{2} & +  1.08 x_{3} & +  0.03 x_{4} & +  0.08 x_{8} & -0.06 x_{9} & +  1.08 x_{7}\\
 x_{6}   &  1.21538461538 & +  0.25 x_{1} & -0.40 x_{2} & -0.46 x_{3} & -0.28 x_{4} & +  0.04 x_{8} & +  0.07 x_{9} & -0.46 x_{7}\\
 x_{10}   &  35.9692307692 & -0.11 x_{1} & -3.80 x_{2} & -20.08 x_{3} & -9.03 x_{4} & -0.08 x_{8} & +  1.06 x_{9} & -14.08 x_{7}\\
 x_{11}   &  22.5384615385 & -8.62 x_{1} & -3.00 x_{2} & +  0.85 x_{3} & +  9.54 x_{4} & -0.15 x_{8} & -0.08 x_{9} & -10.15 x_{7}\\
 x_{12}   &  37.9230769231 & -0.77 x_{1} & -2.00 x_{2} & +  1.31 x_{3} & +  0.92 x_{4} & -0.69 x_{8} & +  0.15 x_{9} & -15.69 x_{7}\\
\hline
z    &  -7.95384615385 & -1.34 x_{1} & +  2.20 x_{2} & -1.38 x_{3} & -0.95 x_{4} & -0.38 x_{8} & -0.09 x_{9} & -5.38 x_{7}\\
\end{array}\]
\section{Optimization Phase Simplex}
Starting Dictionary is:
\[\begin{array}{c| c c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} }
 x_{5}   &  1.03076923077 & +  0.11 x_{1} & +  0.80 x_{2} & +  1.08 x_{3} & +  0.03 x_{4} & +  0.08 x_{8} & -0.06 x_{9} & +  1.08 x_{7}\\
 x_{6}   &  1.21538461538 & +  0.25 x_{1} & -0.40 x_{2} & -0.46 x_{3} & -0.28 x_{4} & +  0.04 x_{8} & +  0.07 x_{9} & -0.46 x_{7}\\
 x_{10}   &  35.9692307692 & -0.11 x_{1} & -3.80 x_{2} & -20.08 x_{3} & -9.03 x_{4} & -0.08 x_{8} & +  1.06 x_{9} & -14.08 x_{7}\\
 x_{11}   &  22.5384615385 & -8.62 x_{1} & -3.00 x_{2} & +  0.85 x_{3} & +  9.54 x_{4} & -0.15 x_{8} & -0.08 x_{9} & -10.15 x_{7}\\
 x_{12}   &  37.9230769231 & -0.77 x_{1} & -2.00 x_{2} & +  1.31 x_{3} & +  0.92 x_{4} & -0.69 x_{8} & +  0.15 x_{9} & -15.69 x_{7}\\
\hline
z    &  -7.95384615385 & -1.34 x_{1} & +  2.20 x_{2} & -1.38 x_{3} & -0.95 x_{4} & -0.38 x_{8} & -0.09 x_{9} & -5.38 x_{7}\\
\end{array}\]


 $ x_{2} $ enters and $ x_{6} $ leaves 

 \[\begin{array}{c| c c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} }
 x_{5}   &  3.46153846154 & +  0.62 x_{1} & -2.00 x_{6} & +  0.15 x_{3} & -0.54 x_{4} & +  0.15 x_{8} & +  0.08 x_{9} & +  0.15 x_{7}\\
 x_{2}   &  3.03846153846 & +  0.63 x_{1} & -2.50 x_{6} & -1.15 x_{3} & -0.71 x_{4} & +  0.10 x_{8} & +  0.17 x_{9} & -1.15 x_{7}\\
 x_{10}   &  24.4230769231 & -2.52 x_{1} & +  9.50 x_{6} & -15.69 x_{3} & -6.33 x_{4} & -0.44 x_{8} & +  0.40 x_{9} & -9.69 x_{7}\\
 x_{11}   &  13.4230769231 & -10.52 x_{1} & +  7.50 x_{6} & +  4.31 x_{3} & + 11.67 x_{4} & -0.44 x_{8} & -0.60 x_{9} & -6.69 x_{7}\\
 x_{12}   &  31.8461538462 & -2.04 x_{1} & +  5.00 x_{6} & +  3.62 x_{3} & +  2.35 x_{4} & -0.88 x_{8} & -0.19 x_{9} & -13.38 x_{7}\\
\hline
z    &  -1.26923076923 & +  0.06 x_{1} & -5.50 x_{6} & -3.92 x_{3} & -2.52 x_{4} & -0.17 x_{8} & +  0.29 x_{9} & -7.92 x_{7}\\
\end{array}\]


 $ x_{1} $ enters and $ x_{11} $ leaves 

 \[\begin{array}{c| c c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} }
 x_{5}   &  4.24680073126 & -0.06 x_{11} & -1.56 x_{6} & +  0.41 x_{3} & +  0.14 x_{4} & +  0.13 x_{8} & +  0.04 x_{9} & -0.24 x_{7}\\
 x_{2}   &  3.84826325411 & -0.06 x_{11} & -2.05 x_{6} & -0.89 x_{3} & -0.01 x_{4} & +  0.07 x_{8} & +  0.14 x_{9} & -1.56 x_{7}\\
 x_{10}   &  21.2084095064 & +  0.24 x_{11} & +  7.70 x_{6} & -16.72 x_{3} & -9.12 x_{4} & -0.34 x_{8} & +  0.55 x_{9} & -8.09 x_{7}\\
 x_{1}   &  1.2760511883 & -0.10 x_{11} & +  0.71 x_{6} & +  0.41 x_{3} & +  1.11 x_{4} & -0.04 x_{8} & -0.06 x_{9} & -0.64 x_{7}\\
 x_{12}   &  29.2449725777 & +  0.19 x_{11} & +  3.55 x_{6} & +  2.78 x_{3} & +  0.08 x_{4} & -0.80 x_{8} & -0.08 x_{9} & -12.09 x_{7}\\
\hline
z    &  -1.19561243144 & -0.01 x_{11} & -5.46 x_{6} & -3.90 x_{3} & -2.46 x_{4} & -0.18 x_{8} & +  0.29 x_{9} & -7.96 x_{7}\\
\end{array}\]


 $ x_{9} $ enters and $ x_{1} $ leaves 

 \[\begin{array}{c| c c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} }
 x_{5}   &  5.1935483871 & -0.13 x_{11} & -1.03 x_{6} & +  0.71 x_{3} & +  0.97 x_{4} & +  0.10 x_{8} & -0.74 x_{1} & -0.71 x_{7}\\
 x_{2}   &  6.93548387097 & -0.29 x_{11} & -0.32 x_{6} & +  0.10 x_{3} & +  2.68 x_{4} & -0.03 x_{8} & -2.42 x_{1} & -3.10 x_{7}\\
 x_{10}   &  33.5161290323 & -0.68 x_{11} & + 14.58 x_{6} & -12.77 x_{3} & +  1.58 x_{4} & -0.74 x_{8} & -9.65 x_{1} & -14.23 x_{7}\\
 x_{9}   &  22.5161290323 & -1.68 x_{11} & + 12.58 x_{6} & +  7.23 x_{3} & + 19.58 x_{4} & -0.74 x_{8} & -17.65 x_{1} & -11.23 x_{7}\\
 x_{12}   &  27.5161290323 & +  0.32 x_{11} & +  2.58 x_{6} & +  2.23 x_{3} & -1.42 x_{4} & -0.74 x_{8} & +  1.35 x_{1} & -11.23 x_{7}\\
\hline
z    &  5.22580645161 & -0.48 x_{11} & -1.87 x_{6} & -1.84 x_{3} & +  3.13 x_{4} & -0.39 x_{8} & -5.03 x_{1} & -11.16 x_{7}\\
\end{array}\]


 $ x_{4} $ enters and $ x_{12} $ leaves 

 \[\begin{array}{c| c c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} }
 x_{5}   &  23.9545454545 & +  0.09 x_{11} & +  0.73 x_{6} & +  2.23 x_{3} & -0.68 x_{12} & -0.41 x_{8} & +  0.18 x_{1} & -8.36 x_{7}\\
 x_{2}   &  58.8409090909 & +  0.32 x_{11} & +  4.55 x_{6} & +  4.30 x_{3} & -1.89 x_{12} & -1.43 x_{8} & +  0.14 x_{1} & -24.27 x_{7}\\
 x_{10}   &  64.1590909091 & -0.32 x_{11} & + 17.45 x_{6} & -10.30 x_{3} & -1.11 x_{12} & -1.57 x_{8} & -8.14 x_{1} & -26.73 x_{7}\\
 x_{9}   &  402.113636364 & +  2.77 x_{11} & + 48.18 x_{6} & + 37.93 x_{3} & -13.80 x_{12} & -10.98 x_{8} & +  1.05 x_{1} & -166.09 x_{7}\\
 x_{4}   &  19.3863636364 & +  0.23 x_{11} & +  1.82 x_{6} & +  1.57 x_{3} & -0.70 x_{12} & -0.52 x_{8} & +  0.95 x_{1} & -7.91 x_{7}\\
\hline
z    &  65.8863636364 & +  0.23 x_{11} & +  3.82 x_{6} & +  3.07 x_{3} & -2.20 x_{12} & -2.02 x_{8} & -2.05 x_{1} & -35.91 x_{7}\\
\end{array}\]


 $ x_{3} $ enters and $ x_{10} $ leaves 

 \[\begin{array}{c| c c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} }
 x_{5}   &  37.8344370861 & +  0.02 x_{11} & +  4.50 x_{6} & -0.22 x_{10} & -0.92 x_{12} & -0.75 x_{8} & -1.58 x_{1} & -14.15 x_{7}\\
 x_{2}   &  85.6092715232 & +  0.19 x_{11} & + 11.83 x_{6} & -0.42 x_{10} & -2.35 x_{12} & -2.09 x_{8} & -3.26 x_{1} & -35.42 x_{7}\\
 x_{3}   &  6.23178807947 & -0.03 x_{11} & +  1.70 x_{6} & -0.10 x_{10} & -0.11 x_{12} & -0.15 x_{8} & -0.79 x_{1} & -2.60 x_{7}\\
 x_{9}   &  638.496688742 & +  1.60 x_{11} & + 112.49 x_{6} & -3.68 x_{10} & -17.90 x_{12} & -16.75 x_{8} & -28.93 x_{1} & -264.56 x_{7}\\
 x_{4}   &  29.1589403974 & +  0.18 x_{11} & +  4.48 x_{6} & -0.15 x_{10} & -0.87 x_{12} & -0.76 x_{8} & -0.28 x_{1} & -11.98 x_{7}\\
\hline
z    &  85.0066225166 & +  0.13 x_{11} & +  9.02 x_{6} & -0.30 x_{10} & -2.54 x_{12} & -2.49 x_{8} & -4.47 x_{1} & -43.87 x_{7}\\
\end{array}\]


 $ x_{6} $ enters and Unbounded Dictionary!


 $ x_{6} $ enters and Unbounded Dictionary!
\end{document}
